﻿<%@ Control Language="C#" AutoEventWireup="true" CodeBehind="WebUserControl1.ascx.cs" Inherits="UILGestion.Control.WebUserControl1" %>


<%@ Register assembly="AjaxControlToolkit" namespace="AjaxControlToolkit" tagprefix="asp" %>
<%@ Register assembly="CustomControls" namespace="CustomControls" tagprefix="cc2" %>







<asp:Panel ID="Panel1" runat="server" BackColor="#9CAAC1" Font-Bold="True"  Font-Names="Arial"
       Font-Size="Medium"
    ForeColor="#666699">
    Partir Recurso</asp:Panel>

<table class="ui-accordion">
    <tr>
        <td bgcolor="#9CAAC1" style="text-align: right" width="100px">
            Recurso:</td>
        <td>
            <asp:Label ID="Label1" runat="server" Text="Label"></asp:Label>
        </td>
    </tr>
    <tr>
        <td bgcolor="#9CAAC1" style="text-align: right" width="100px">
            Unidad:</td>
        <td>
            <asp:Label ID="Label2" runat="server" Text="Label"></asp:Label>
        </td>
    </tr>
</table>

                 
       <asp:GridView ID="recursoPartirGridView" 
       Runat="Server" 
       AutoGenerateColumns="false" 
       DataKeyNames="idInternal"  
       ShowFooter = "True"       
       Font-Names="Arial"
       Font-Size="X-Small"
       CellPadding="4" 
       SkinID="GridView"
         
>
                  
                  <EditRowStyle BackColor="#FFFF99" BorderStyle="Outset" />
                        <FooterStyle BackColor="#FFFF99" BorderStyle="Outset" />
                       <HeaderStyle backcolor="#DFE8F6" Font-Bold="True" forecolor="#336699"  
                       BorderColor="LightSteelBlue"/>

                  <Columns>
    
                
                  <asp:TemplateField     HeaderText = "Codigo"  ItemStyle-Width="75px"  >
                                       <ItemTemplate>
                                       
                                                <asp:Label ID="codigoLabel"    runat="server"    	 
                                                Text='<%# Eval("codigo")%>' 
                                                BackColor="Transparent" > </asp:Label>
                                       </ItemTemplate>
                                    
                                       <FooterTemplate>
                                               <asp:Label ID="codigoInsertLabel" runat="server"      
                                               BackColor="Transparent" 
                                                />
                                       </FooterTemplate>
                                      
<ItemStyle Width="75px"></ItemStyle>
                                      
                   </asp:TemplateField>
                  <asp:TemplateField     HeaderText = "descripcion"   ItemStyle-Width="450px">
                                       <ItemTemplate>
                                                <asp:Label ID="descripcionLabel"     runat="server"    	 
                                                Text='<%# Eval("descripcion")%>' 
                                                BackColor="Transparent" > </asp:Label>
                                       </ItemTemplate>
                                     
                                        <FooterTemplate>
                                               <asp:Label ID="descripcionInsertLabel" runat="server"     
                                               BackColor="Transparent" 
                                                />
                                       </FooterTemplate>
                                      
<ItemStyle Width="450px"></ItemStyle>
                                      
                   </asp:TemplateField>
                      <asp:TemplateField     HeaderText = "Unidad"  ItemStyle-Width="35px" >
                                       <ItemTemplate>
                                                <asp:Label ID="unidadLabel"     runat="server"     
                                                Text='<%# Eval("unidad")%>' 
                                                BackColor="Transparent" > </asp:Label>
                                       </ItemTemplate>
                                     
                                        <FooterTemplate>
                                               <asp:Label ID="unidadInsertLabel" runat="server"    
                                               BackColor="Transparent" 
                                               />
                                       </FooterTemplate>
                                      
<ItemStyle Width="35px"></ItemStyle>
                                      
                   </asp:TemplateField>

                   <asp:TemplateField     HeaderText = "Cantidad"  
                          ItemStyle-HorizontalAlign="Right"  >
                                       <ItemTemplate>
                                          <div class="labelDecimal">
                                                <asp:Label ID="cantidadLabel"   Width="80"  runat="server"    style="text-align:right;" 
                                                Text='<%# Eval("cantidad")%>' 
                                                BackColor="Transparent" > </asp:Label>
                                                   </div>
                                       </ItemTemplate>
                                       <FooterTemplate>
                                       <table>
                                    
                                       <tr>
                                       <td align="right"><b>Disponible:</b></td>
                                       <td>
                                       
                                           <div class="labelDecimal">
                                               <asp:Label ID="cantidadBaseLabel" runat="server" BackColor="Transparent" />
                                           </div>
                                       </td>
                                       </tr>
                                          <tr>
                                               <td align="right"><b>Uso:</b> </td>
                                               <td> 
                                                   <cc2:PostTextBox ID="cantidadInsertTextBox" runat="server" 
                                                       BackColor="Transparent"  Font-Size="X-Small"
                                                       onchange="javascript:calcularTotalXCantParcialEdit(this);" TabIndex="2"  DataType="Double"
                                                       Width="80" BorderStyle="None" />

                                                

                                                     </td>
                                                        
                                        </tr>
                                       </table>
                                       
                                                
                                               
                                       </FooterTemplate>
                                       
<ItemStyle HorizontalAlign="Right"></ItemStyle>
                                       
                   </asp:TemplateField>

                   <asp:TemplateField     HeaderText = "Precio"  ItemStyle-HorizontalAlign="Right"  >
                                       <ItemTemplate>
                                          <div class="labelDecimal">
                                                <asp:Label ID="precioLabel"   Width="80"  runat="server"    	 
                                                Text='<%# Eval("precio")%>' 
                                                BackColor="Transparent" > </asp:Label>
                                                </div>
                                       </ItemTemplate>
                                       <FooterTemplate>

                                       <table>
                                 
                                       <tr>
                                       
                                       <td>
                                           <b></b>
                                       </td>
                                           <td>
                                               <div class="labelDecimal" align="right">
                                                   <asp:Label ID="precioBaseLabel" runat="server" BackColor="Transparent" />
                                               </div>
                                           </td>
                                       </tr>
                                             <tr>
                                                <td align="right">
                                                     <cc2:PostTextBox  ID="precioInsertTextBox" runat="server" 
                                                         BackColor="Transparent"  Font-Size="X-Small"
                                                        ReadOnly="true" Width="80" DataType="Double" />
                                                           
                                                </td>
                                        </tr>
                                       </table

                                               
                                       </FooterTemplate>
                                     
<ItemTemplate>
                                          <div class="labelDecimal">
                                                <asp:Label ID="precioLabel"   Width="80"  runat="server"    	 
                                                Text='<%# Eval("precio")%>' 
                                                BackColor="Transparent" > </asp:Label>
                                                </div>
                                       
</ItemTemplate>

<ItemStyle HorizontalAlign="Right"></ItemStyle>
                                     
                   </asp:TemplateField>

                    <asp:TemplateField     HeaderText = "Total"  ItemStyle-HorizontalAlign="Right">
                                       <ItemTemplate>
                                          <div class="labelDecimal">
                                                <asp:Label ID="totalLabel"   Width="80"  runat="server"    	 
                                                Text='<%# Eval("parcial")%>' 
                                                BackColor="Transparent" > </asp:Label>
                                                </div>
                                       </ItemTemplate>
                                         <FooterTemplate>

                                       <table>
                                  
                                       <tr>
                                       <td align="right"><b>Disponible:</b></td>
                                       <td>
                                           <div class="labelDecimal">
                                               <asp:Label ID="totalBaseInsertLabel" runat="server" BackColor="Transparent" />
                                           </div>
                                       </td>
                                       </tr>
                                            <tr>
                                               <td align="right"><b>Uso:</b> </td>
                                               <td>
                                                  <cc2:PostTextBox ID="totalInsertTextBox" runat="server" BackColor="Transparent"  Font-Size="X-Small"
                                                       onchange="javascript:calcularCantXTotalParcialEdit(this);" TabIndex="3"  DataType="Double"
                                                       Width="80" />

                                                      
                                               </td>
                                        </tr>
                                       </table>

                                               
                                       </FooterTemplate>
                                     
<ItemStyle HorizontalAlign="Right"></ItemStyle>
                                     
                   </asp:TemplateField>


                    <asp:TemplateField >
                            <ItemTemplate>
                                <asp:ImageButton ID="ImageButton1" runat="server" 
                                    OnClientClick="return confirm('Usted quiere eliminar?')"  
                                    CommandArgument='<%# Eval("idInternal")%>'  OnClick="DeleterecuPartirItem"  
                                    ImageUrl="~/Images/delete.gif" />
                                <%--<asp:LinkButton ID="lnkRemove" runat="server"  
                                
                                
                                Text="&lt;img src=&quot;../Images/delete.gif&quot; /&gt;"></asp:LinkButton>--%>
                           </ItemTemplate>
                           <FooterTemplate>
                             <asp:Button ID="btnAdd" runat="server" OnClick="AddNewRecuPartirItem"  Font-Size="X-Small"
                                                     Text="Add" Width="50px"></asp:Button>
                                                     </FooterTemplate>
                                                     <%-- Text="&lt;img src=&quot;../Images/up.gif&quot; /&gt;">--%>
                    </asp:TemplateField>
                  </Columns>
                  </asp:GridView>
             
         
        
            


